package controllers

import (
	"encoding/json"

	"github.com/astaxie/beego"
)

type ArticleController struct {
	beego.Controller
}

//这是新增加的函数，用户如果没有进行注册，那么就会通过反射来执行对应的函数
func (this *ArticleController) URLMapping() {
	this.Mapping("list", this.List)
}

// @router /list/:key [get]
func (this *ArticleController) List() {
	var params = this.Ctx.Input.Params()
	json, _ := json.Marshal(params)
	this.Ctx.WriteString(string(json))
}
